package com.servlet;

import com.util.UtilJdbc;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class CreateActServlet extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("service");
        req.setCharacterEncoding("utf-8");
        resp.setContentType("text/html;charset=utf-8");

        String actname=req.getParameter("actname");
        String planner=req.getParameter("planner");
        String member=req.getParameter("member");
        String activityContent=req.getParameter("activityContent");
        String actid=req.getParameter("actid");
        String acttime=req.getParameter("acttime");
        String actplace=req.getParameter("actplace");

        UtilJdbc utilJdbc=new UtilJdbc();
        utilJdbc.create(actname,planner,member,activityContent,actid,acttime,actplace);
        req.getRequestDispatcher("/page/CreateActRight.jsp").forward(req,resp);
    }
}
